#include "ChannelManager.h"
#include "Channel.h"
#include "User.h"
#include "Database.h"
#include "Configuration.h"

#include <iostream>

int	main()
{
	//Database::GetDatabase()->Open("E:/EIP/code/Agora_Admin_Draft/Debug/test");
	Database* db = new Database();
	Configuration::GetConfiguration()->InitDatabase(db);
	Configuration::GetConfiguration()->GetDatabase()->Open("E:/EIP/code/Agora_Admin_Draft/Debug/test");
	std::cout << "base" << std::endl;
	ChannelManager::GetChannelManager()->GetChannel(123);
std::cout << "cm" << std::endl;
//Channel *test = new Channel("toto",7,"toto",7,"toto",7,"toto",7,true,7,7);
	//Channel test2("toto",9,"toto",7,"toto",7,"toto",7,true,7,7);
//	std::cout << "cc" << std::endl;
//	User *titi = new User("titi", "titi");
//	User tutu("tutu", "tutu");
//std::cout << "users" << std::endl;
//	test->AddUser(&tutu);
//	test->AddUser(titi);
//	std::cout << "add" << std::endl;
//	std::cout << titi->GetLogin() << std::endl;
//	std::cout << titi->GetId() << std::endl;
	//std::cout << test->GetUser().front()->GetLogin() << std::endl;

	//std::cout << test->GetChannelChild().size() << std::endl;
	//test2.SetParent(test);
	//std::cout << test->HaveParent() << std::endl;
	//std::cout << test2.HaveParent() << std::endl;

	//std::cout << test2.GetMaxNameLength() << std::endl;
	//test->SetMaxNameLength(56,true);
	//std::cout << test2.GetMaxNameLength() << std::endl;
	//std::cout << test->GetMaxNameLength() << std::endl;

	//std::cout << test->GetChannelChild().size() << std::endl;
	//test->RemoveChannelChild(&test2);
	//std::cout << test->GetChannelChild().size() << std::endl;
	system("pause");
}